package com.ruimei.controller;

import com.ruimei.service.IBookService;
import com.ruimei.util.ResultMap;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Api(tags={"通讯录"})
public class BookController
{
  @Resource
  private IBookService book;
  
  @ApiOperation("家长端通讯录")
  @PostMapping({"/parent/book"})
  public ResultMap getParentBook(String classId)
  {
    return this.book.getBooks(classId);
  }
  
  @ApiOperation("教师端通讯录")
  @PostMapping({"/teacher/book"})
  public ResultMap getTeacherBook(String classId)
  {
    return this.book.getTeacherBook(classId);
  }
}

